import mongoose, { Schema, Document } from 'mongoose';

// 定义群组接口
interface IGroup extends Document {
    groupId: string;
    groupName: string;
}

// 定义群组模式
const GroupSchema = new Schema<IGroup>({
    groupId: { type: String, required: true },
    groupName: { type: String, unique: true }
});

// 创建群组模型
const GroupDB = mongoose.model<IGroup>('Group', GroupSchema);

export default GroupDB;

